{% extends "base.html" %}

{% block page_content %}

<h1 class="mt-5 mb-2">图像匹配</h1>

<p class="pt-1 pb-1">通过对图像内容、特征、结构、关系、纹理及灰度等的对应关系，相似性和一致性的分析，判断两张图片是否匹配。</p>

<form action="http://47.101.196.204:8080/process_image_match" method="POST" enctype="multipart/form-data">
    <table class="table">
        <tr>
            <td>
                <div class="container">
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>上传图片</label>
                            <div class="input-group">
                                <span class="input-group-btn">
                                    <span class="btn btn btn-primary btn-file">
                                        浏览...<input type="file" id="imgInp1" name="file1">
                                    </span>
                                </span>
                                <input type="text" class="form-control" readonly>
                            </div>
                            <img id='img-upload-1' class="img-responsive"/>
                        </div>
                    </div>
                </div>
            </td>
            <td>
                <div class="container">
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>上传图片</label>
                            <div class="input-group">
                                <span class="input-group-btn">
                                    <span class="btn btn btn-primary btn-file">
                                        浏览...<input type="file" id="imgInp2" name="file2">
                                    </span>
                                </span>
                                <input type="text" class="form-control" readonly>
                            </div>
                            <img id='img-upload-2' class="img-responsive"/>
                        </div>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td colspan="2"><input type="submit" class="btn btn-success"/></td>
        </tr>
    </table>
</form>

{% endblock %}

{% block scripts %}
{{ super() }}
<script type="text/javascript" src="{{ url_for('static', filename = 'image_upload_2.js') }}"></script>
{% endblock scripts %}